package com.city.service.report.impl;

import com.city.domain.report.CtCropland;
import com.city.repository.report.CtCroplandRepository;
import com.city.service.report.CtCroplandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 李顺时
 * @Description:
 * @Date: Create in 14:52 2018/9/7
 * @Modified By:
 * */

@Service
public class CtCroplandServiceImpl implements CtCroplandService {

    @Autowired
    private CtCroplandRepository croplandRepository;

    @Override
    public CtCropland findLegalPersonById(Integer id) {
        return croplandRepository.findOne(id);
    }

    @Override
    public List<CtCropland> findAll() {
        return croplandRepository.findAll();
    }

    @Override
    public List<CtCropland> findAllByGathererName(String gathererName) {
        return croplandRepository.findAllByGathererName(gathererName);
    }

    @Override
    public CtCropland saveCropland(CtCropland ctCropland) {
        return croplandRepository.save(ctCropland);
    }
}
